<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    首页
    <div id="nickname"></div>
    <a href="5.html">退出</a>
    <script>
        if (!document.cookie) {
            location.href = '5.html'
        }
        nickname.innerHTML = (document.cookie.split('=')[1]);
    </script>
</body>

</html>